public class Main {
    public static void main(String[] args) {

    }

    /**
     * 移动零
     * @param nums
     */
    public static void moveZeroes(int[] nums) {
        int left=-1;
        int right=0;
        while(right<nums.length){
            if(nums[right]!=0){
                left++;
                swap(nums,left,right);
            }
            right++;
        }
    }
    public static void swap(int[] arr,int left,int right){
        int tmp=arr[left];
        arr[left]=arr[right];
        arr[right]=tmp;
    }
}